package design.graduation.novelsystem.model.domian;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author: 洪少尉
 * @Date: 2020/4/14 02:53
 * @Description: 
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "system_menu")
public class Menu implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父级菜单ID
     */
    @TableField(value = "pid")
    private Integer pid;

    /**
     * 类型[topmenu/leftmenu/permission]
     */
    @TableField(value = "type")
    private String type;

    /**
     * 如果type为菜单类型，则type_code跟随顶部菜单
如果type为权限类型，则type_code为具体权限
     */
    @TableField(value = "type_code")
    private String typeCode;

    /**
     * 菜单名称或权限名称
     */
    @TableField(value = "title")
    private String title;

    /**
     * 图标样式
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 链接地址
     */
    @TableField(value = "href")
    private String href;

    /**
     * 网页样式
     */
    @TableField(value = "target")
    private String target;

    /**
     * 排序码
     */
    @TableField(value = "sort_code")
    private Integer sortCode;

    /**
     * 状态【0不可用1可用】
     */
    @TableField(value = "available")
    private Integer available;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_PID = "pid";

    public static final String COL_TYPE = "type";

    public static final String COL_TYPE_CODE = "type_code";

    public static final String COL_TITLE = "title";

    public static final String COL_ICON = "icon";

    public static final String COL_HREF = "href";

    public static final String COL_TARGET = "target";

    public static final String COL_SORT_CODE = "sort_code";

    public static final String COL_AVAILABLE = "available";
}